﻿// Deep Earth is a community project available under the Microsoft Public License (Ms-PL)
// Code is provided as is and with no warranty – Use at your own risk
// View the project and the latest code at http://DeepEarth.codeplex.com/

using System;

namespace DeepEarth.Client.MapControl.Layers
{
    /// <summary>
    /// <para>
    /// The various constant values that will never change throughout the layers
    /// The name of the value is self describing
    /// </para>
    /// </summary>
    public static class Constants
    {
        // These are Earth specific, not any projection specific
        // http://en.wikipedia.org/wiki/Geographic_coordinate_system

        public const double EARTH_MIN_LATITUDE = -85.05112878D;
        public const double EARTH_MAX_LATITUDE = 85.05112878D;
        public const double EARTH_MIN_LONGITUDE = -180D;
        public const double EARTH_MAX_LONGITUDE = 180D;
        public const double EARTH_CIRCUMFERENCE = EARTH_RADIUS * 2 * Math.PI;
        public const double HALF_EARTH_CIRCUMFERENCE = EARTH_CIRCUMFERENCE / 2;
        public const double EARTH_RADIUS = 6378137;

        public const double PROJECTION_OFFSET = EARTH_CIRCUMFERENCE * 0.5;

        public const double INCH_TO_METER = 0.0254D;
        public const double METER_TO_INCH = 39.3700787D;
        public const double METER_TO_MILE = 0.000621371192D;
        public const double MILE_TO_METER = 1609.344D;

        public const double HALF_PI = 0.159154943091895;
        public const double RADIANS_TO_DEGREES = 57.2957795130823;
    }
}
